package com.xayy.health.core.enums;

import lombok.Getter;

/**
 * 算法类型枚举
 *
 * @author houchengwei
 * createTime 2023/2/20
 * @version V1.0
 */
public enum AlgorithmTypeEnum {
    //剔野
    TY(1, "剔野"),
    //填充
    TC(2, "填充"),
    //平滑
    PH(3, "平滑");

    @Getter
    private Integer code;

    @Getter
    private String name;

    AlgorithmTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String valueof(Integer index) {
        for (AlgorithmTypeEnum relationTypeEnum : values()) {
            if (relationTypeEnum.getCode().equals(index)) {
                return relationTypeEnum.name;
            }
        }
        return "";
    }
}
